package com.skynet.supervision.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.skynet.supervision.aop.uac.UserBriefInfo;
import com.skynet.supervision.entities.UserAccount;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import javax.annotation.Nonnull;


/**
 * @author xuchao
 * @date 2023-03-08 12:18
 */

@Component
@Mapper
public interface UserAccountMapper extends BaseMapper<UserAccount> {

    UserAccount getOneByAccount(@Nonnull @Param("account") String account);
    UserAccount getOneById(@Nonnull @Param("uid") String uid);

    UserBriefInfo getBriefById(@Nonnull @Param("uid") String uid);

    Integer initPassword(@Nonnull @Param("uid") String uid,@Nonnull @Param("password") String password);

//    UserAccount getOne(@Nonnull @Param("id") Serializable id);
//
//    Integer updateLastLoginTime(@Nonnull @Param("id") Serializable id);

}
